﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YunShop_WebAPI.BLL.SxfPay
{
    public class PayService
    {
        public enum OrderType
        {
            None = 0,
            /// <summary>
            /// 食品订单支付
            /// </summary>
            FoodPay = 1,
            /// <summary>
            /// 会员卡充值
            /// </summary>
            MemberTopupPay = 2,
            /// <summary>
            /// 分销佣金充值
            /// </summary>
            UserSalePay = 3,
            /// <summary>
            /// 分销佣金提现
            /// </summary>
            UserSaleBalanceUse = 4,
        }

        public enum PayOrderStatus
        {
            None = 0,
            /// <summary>
            /// 支付成功
            /// </summary>
            Success = 1,
            /// <summary>
            /// 金额不等，退款
            /// </summary>
            AmtErrorRefound = 2,
            /// <summary>
            /// 交易结束
            /// </summary>
            Finished = 3,
            /// <summary>
            /// 交易关闭
            /// </summary>
            Closed = 4,
            /// <summary>
            /// 交易创建，等待支付
            /// </summary>
            BuyerPay = 5,
            /// <summary>
            /// 申请退款
            /// </summary>
            ApplyRefound = 6,
            /// <summary>
            /// 退款完成
            /// </summary>
            RefoundFinish = 7,
            /// <summary>
            /// 查询异常
            /// </summary>
            QueryError = 8,
            /// <summary>
            /// 单据不存在
            /// </summary>
            NotExists = 9,
            /// <summary>
            /// 多次查询失败，取消单据
            /// </summary>
            Cancel = 10,
        }

        public enum WeChatPayStatus
        {
            None,
            /// <summary>
            /// 交易创建，等待买家付款	交易创建	false（不触发通知）
            /// </summary>
            WAIT_BUYER_PAY,

            /// <summary>
            /// 未付款交易超时关闭，或支付完成后全额退款	交易关闭	true（触发通知）
            /// </summary>
            TRADE_CLOSED,

            /// <summary>
            /// 交易支付成功，可退款	交易支付成功	true（触发通知）
            /// </summary>
            SUCCESS,

            /// <summary>
            /// 交易结束，不可退款
            /// </summary>
            TRADE_FINISHED
        }
    }
}
